# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Pablo Correa Gómez <pcg@pcorreag.tk>
pkgname=gnome-firmware
pkgver=45.0
pkgrel=0
pkgdesc="Install firmware on devices"
url="https://gitlab.gnome.org/World/gnome-firmware"
arch="all !armhf !ppc64le !s390x !riscv64" # limited by fwupd
license="GPL-2.0-only"
makedepends="
	elogind-dev
	fwupd-dev
	gtk4.0-dev
	help2man
	libadwaita-dev
	libxmlb-dev
	meson
	"
options="!check" # no tests
subpackages="$pkgname-doc $pkgname-lang"
source="https://gitlab.gnome.org/World/gnome-firmware/-/archive/$pkgver/gnome-firmware-$pkgver.tar.gz"
provides="gnome-firmware-updater=$pkgver-r$pkgrel"
replaces="gnome-firmware-updater"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dsystemd=false \
		-Delogind=true \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
937165514d6eae785b794de58e3dfcd30212253513e1638a0749ceae18f2c51e076ad1b50a55af479fdb599e9dac7aea01aade77c2538055bb5e67a3b869dd2a  gnome-firmware-45.0.tar.gz
"
